﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Web;
using System.Web.Mvc;

namespace Web.Controllers
{
    public class AflaxController : Controller
    {
        //
        // GET: /Aflax/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Socket()
        {
            return View();
        }
        public ActionResult SocketTest()
        {
            var client = new TcpClient();
            client.Connect("www.silenthink.com", 5000);
            using (var stream = client.GetStream())
            {
                var buffer=Encoding.UTF8.GetBytes("1");
                stream.Write(buffer,0,buffer.Length);
            }
            return Json(0);
        }
    }
}
